package structureType.bridge.CarAndRoadAndPerson;

public class Person {
	private String name;
	private int age;
	Road road;
	Car car;
	
	public Person(String name){
		this.name = name;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public void drive(){
		road = new HighRoad();
		car = new Moto();
		System.out.println(this.toString()+":"+this.getName()+" is driving  " + car.toString() + " on " + road.toString());
	}
	
	public String toString(){
		return "Person";
	}
}
